<template>
	<div>
		<div class="container center banner">
			<img src="../../static/img/banner.png" alt="" class="img-responsive pc-bg">
			<img src="../../static/img/m-banner.png" alt="" class="img-responsive m-bg">
		</div>
		<div class="container center item-nav">
			<div class="col-lg-3 col-md-3 col-sm-12 col-xs-12 ">
				<div class="pc-item-nav">
					<div class="pc-item-nav-tit">
						<label>新生入学</label>
						<span>/</span>
						<span>enrollment</span>
					</div>
					<ul class="list-unstyled pc-item-nav-content">
						<li><i class="iconfont icon-arrows-8-2"></i><router-link to="/question_answer"><span>新生答疑</span></router-link></li>
						<li class="active"><i class="iconfont icon-arrows-8-2"></i><router-link to="/admission_query"><span>录取查询</span></router-link></li>
						<li><i class="iconfont icon-arrows-8-2"></i><router-link to="/admission_information"><span>入学须知</span></router-link></li>
					</ul>
					<div>
						<router-link to="special_major_accouting">
							<img src="../../static/img/pro_info.png" class="img-responsive" alt="专业介绍">
						</router-link>
					</div>
					<div>
						<router-link to="sign_online">
							<img src="../../static/img/sign.png" class="img-responsive" alt="在线报名">
						</router-link>
					</div>
					
				</div>
				<!-- mobail -->
				<div class="m-item-nav m-5">
					<div>
						<router-link to='/question_answer'><span class="text-center">新生答疑</span></router-link>
					</div>
					<div class="active">
						<router-link to='/admission_query'><span class="text-center">录取查询</span></router-link>
					</div>
					<div >
						<router-link to="/admission_information"><span class="text-center">入学须知</span></router-link>
					</div>
				</div>
			</div>
			<div class="col-lg-9 col-md-9 col-sm-12 col-xs-12 content">
				<div class="content-title">
					<div class="content-left">
						<span class="h3">录取查询</span>
					</div>
					<div class="content-right">
						<i class="iconfont icon-bofang"></i>
						<span><router-link to='/'>首页</router-link></span>
						<span>></span>
						<span><router-link to='/question_answer'>新生入学</router-link></span>
						<span>></span>
						<span><router-link to='/admission_query'>录取查询</router-link></span>
					</div>
				</div>
				<div class="">
					<div class="query_form">
						<form>
						  <div class="form-group">
						    <label for="exampleInputEmail1">考生名字：</label>
						    <div class="input-group">
						      <div class="input-group-addon"><i class="iconfont icon-user"></i></div>
						      <input type="text" class="form-control" id="exampleInputAmount" v-model="name" placeholder="请输入考生名字">
						    </div>
						  </div>
						  <div class="form-group">
						    <label for="exampleInputEmail1">身份证号：</label>
						    <div class="input-group">
						      <div class="input-group-addon"><i class="iconfont icon-shenfen"></i></div>
						      <input type="text" class="form-control" placeholder="请输入身份证号" v-model="identity" @change="validate(identity)"> 
						    </div>
						    <p id="identity">请输入正确的身份证号码！</p>
						  </div>
						  <div class="form-group">
						    <label for="exampleInputEmail1">准考证号：</label>
						    <div class="input-group">
						      <div class="input-group-addon"><i class="iconfont icon-zhengjian"></i></div>
						      <input type="text" class="form-control" id="exampleInputAmount" v-model="num" placeholder="请输入准考证号">
						    </div>
						  </div>
						  
						  <button id="btn" type="button" class="btn btn-primary" @click="submitForm($event)">点击查询</button>
						</form>
					</div>
				</div>
			</div>
		</div>
	</div>
</template>

<script>
	export default {
		data(){
			return{
				identity:'',
				name:'',
				num:''
			}
		},
		created:function(){
			document.title = "录取查询_扬州中瑞酒店职业学院互联网学院招生网";
			var _self = this;
		},
		methods:{
	        validate(str){
		       	var reg= /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/; 
				if(reg.test(str) === false) { 
					document.getElementById('identity').style.display = 'block';
					document.getElementById('btn').setAttribute('disabled','disabled');
		       	}else{
		       		document.getElementById('identity').style.display = 'none';
		       		document.getElementById('btn').setAttribute('disabled','');
		       	}
	    	},
		    submitForm(event) {
	            event.preventDefault();
	            let formData = new FormData();
	            formData.append('name', this.name);
	            formData.append('identity', this.identity);
	            formData.append('num', this.num);
	            
	            let config = {
	              headers: {
	                'Content-Type': 'multipart/form-data'
	              }
	            }
	 
	      /*      this.$http.post('/upload', formData, config).then(function (res) {
	              if (res.status === 2000) {
		//	                这里做处理
	              }
	            })*/
	        }
	    }    
	}
</script>

<style>
</style>